B. Fischer and E. Visser.
Adding concrete syntax to a Prolog-based program synthesis system (extended abstract). In M. Bruynooghe, editor, Preliminary proceedings of the International Symposium on Logic-based Program Synthesis and Transformation (LOPSTR'03), Uppsala, Sweden, August 2003. (
pdf)
This paper is subsumed by the paper '
Retrofitting the AutoBayes program synthesis system with concrete syntax'
Abstract
Program generation and transformation systems manipulate large,
parameterized object language fragments. Support for user-definable
concrete syntax makes this easier but is typically restricted to
certain object and meta languages. We show how Prolog can be
retrofitted with concrete syntax and describe how a seamless
interaction of concrete syntax fragments with an existing ``legacy''
meta-programming system based on abstract syntax is achieved. We apply
the approach to gradually migrate the schemas of the
AutoBayes program
synthesis system to concrete syntax. First experiences show that this
can result in a considerable reduction of the code size and an
improved readability of the code. In particular, abstracting out
fresh-variable generation and second-order term construction allows
the formulation of larger continuous fragments and improves the
``locality'' in the schemas.
Links
Stratego Emacs Mode
The Stratego Emacs Mode provides basic syntax-highlighting for Stratego in Emacs. For installation instructions, see
Stratego Emacs Mode.
Available at:
Stratego for NEdit, Vim, Ultraedit
Available at:
Stratego/XT
Stratego/XT Utilities
A bundle of additional utils for Stratego/XT developers (currently, mostly Dot related)
Releases:
XDoc
XDoc is a documentation generator for Stratego.
Stratego Shell
The
Stratego Shell implements a Stratego interpreter and an interactive shell for Stratego programming. The interpreter and shell are very useful for learning Stratego and for implementing small tests.
Releases:
C and C++
Transformers
The
Transformers Project is developing a program transformation framework for C and C++, based on Stratego/XT. The latest release provides an ambiguous C and C++ syntax definition and separate disambiguation tools for C (complete) and C++ (partial).
Java
Java-front
Java-front adds support for Java program transformation to Stratego/XT. It provides a handcrafted
SDF syntax definition and pretty-printer for Java (J2SE 5.0).
Releases:
AspectJ-front
AspectJ-front defines the syntax of
AspectJ by extending the Java syntax definition of
Java-front.
Jimple-front
Jimple-front defines the syntax of Jimple, the typed 3-address representation of Java bytecode of the
Soot Java optimization framework. This representation is suitable for program optimization and analysis.
Dryad
Dryad is a set tools for semantic analysis of Java. It also provides support for working with Java bytecode in Stratego.
PHP
PHP-front
PHP-front provides a syntax definition, parser, pretty-printer, reflection library, and common strategies for PHP.
SQL
SQL-front provides a syntax definition for SQL92.
Prolog
Prolog-tools is a toolset for transforming Prolog programs.
CategoryInstallation
The released versions of
BibtexTools are currently not available. You can check out the sources directly from
Released November 4th, 2005
License
BibTeX Tools is free software; you can redistribute it and/or modify it
under the terms of the GNU Lesser General Public License as published
by the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This software is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
News
Version 0.2 is the first official release of the Stratego/XT BibTeX
Tools package. It is based on Stratego/XT 0.16 and requires Hevea
1.07, a tool for translating latex to html.
Among the useless things one can do in life, maintaining one or more
publication lists ranks high. My tendency to waste time on my
publication list probably dates back to my days as a PhD student when
I badly needed publications to put on a list. On the other hand, as
publications are the measure of achievement in research, more
researchers may have this problem.
Anyway, maintaining a list of publications can be quite tedious, in
particular if you want to provide multiple views on the
publications. For example, a listing with most recent publications
first, one providing the most important ones first, one organized by
research topic, and finally a separate list for each project. Also
your department may require regular submission of lists. On the web
version the entries should come with links to the pdf files and/or the
webpage of the publisher, but these links should not be displayed in
the version for printing, since they are quite useless there.
Being a computer scientist, I elevated the activity of maintaining
content to maintaining a program for generating the various
lists. This is still a waste of time, of course, but the excuse is
that it will save me time in future. Another excuse is that I
developed my program as a case study for the transformation language
Stratego.
In fact, the bibtex-tools package has emerged over a long time,
starting with a syntax definition for BibTeX first written in 1999. It
turns out that BibTeX has quite an intricate syntax that is not so
easily formalized with a traditional approach based on a separate
lexical analyzer and context-free parser. With the scannerless
approach of
SDF this poses no problems at all.
Also, the use of the Stratego to perform transformations on a
structured representation of a BibTeX file is a definite improvement
over directly transforming its text representation. Moreover, these
transformations can be expressed quite concisely. For example, the
following strategy definitions define an inliner for BibTeX that
replaces occurrences of string identifiers with their body. (BibTeX
allows the definition of strings such as @string{LNCS={Lecture Notes
in Computer Science}}, which can then be quoted in entry fields using
the identifier, e.g., series = LNCS.)
bib-inline =
bottomup(try(DeclareInlineString + InlineString + FoldWords))x
DeclareInlineString =
?String(_, StringField(key, value))
; rules( InlineString : Id(key) -> value )
FoldWords :
ConcValue(Words(ws1), Words(ws2)) -> Words((ws1, ws2))
After having developed my own set of BibTeX tools using the Stratego
transformation language over the last couple of years, I decided to
make them into a proper software package that could be used by others,
complete with a manual that explains the LaTeX/BibTeX/Hevea techniques
used to get a publication list into HTML.
More Information
See the
website of BibTeX Tools for an overview of the development, and introduction, examples, and a manual for BibTeX Tools.